package ocl;

import java.util.ArrayList;
import java.util.List;

import parser.generic.Node;


public class OclExpressionsList extends Node{

	private List<OclExpression> expressions;
	
	public OclExpressionsList()
	{
		this.expressions = new ArrayList<OclExpression>();
	}
	
	public void addOclExpression(OclExpression expression) {
		this.expressions.add(expression);
	}

	@Override
	public String toString() {
		String out = "\n";
		
		for(OclExpression ocl : expressions)
			out += ocl.toK() + ";\n";
		
		return out;
	}

	public String toK() {
		String out = "";
		for(OclExpression ocl : expressions)
			out += "OCL(" + ocl.toK() + ")\n";
		return out.substring(0, out.length() - 1);
	}
}
